Skip to content

feat(cli): add init, start, and update commands with embedded references#912

Merged
larryro merged 5 commits into
mainfrom
feat/tale-init-start-update
Mar 29, 2026
Merged

feat(cli): add init, start, and update commands with embedded references#912
larryro merged 5 commits into
mainfrom
feat/tale-init-start-update

Conversation

@larryro

@larryro larryro commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add tale init, tale start, and tale update CLI commands for local project management — scaffolding config directories, running dev compose, and syncing project files
  • Embed full convex/ and lib/ reference trees into the CLI binary at build time so AI assistants and developers have schema context locally
  • Add platform-specific build outputs (tale-linux, tale-darwin) and supporting utilities (checksums, project discovery, env config improvements)
  • Export new integration types (IntegrationOperation, SqlOperation) and add listIntegrationsForAgent action

Test plan

  • Run bun run --filter @tale/cli generate and verify embedded reference files are generated from convex/ and lib/
  • Run tale init in a fresh directory and verify project scaffold is created with correct structure
  • Run tale start and confirm dev compose launches correctly
  • Run tale update and verify config files sync with checksums
  • Build for both targets (build:linux, build:mac) and verify output binaries are named correctly

Summary by CodeRabbit

Release Notes

  • New Features

    • New init command to bootstrap and configure Tale projects interactively
    • New start command to launch local development environments with Docker
    • New update command to sync and update project files
    • Automatic synchronization of project files after deployment
  • Chores

    • CLI version updated to 1.0.0-dev
    • Enhanced build pipeline with generation step

larryro added 4 commits March 30, 2026 03:03
Split integration storage into file-based config (config.json + connector.ts)
and a slim integrationCredentials DB table for encrypted secrets and runtime
state. Adds unified loader, credential CRUD, file I/O actions, shared Zod
schema, and updates all consumers (agent tools, workflow engine, frontend,
OAuth flows, RLS) to work with the new dual-source model.
Replace filesystem-based monorepo lookups with build-time embedded files
so the compiled CLI binary works without access to the source repo. Add
interactive project name prompt to init, streamline env setup by removing
protocol selector and old DB password flow, add port option to start
command with inherited stdio for foreground mode, and clean up stale
Docker volumes during init.
Embed entire convex/ and lib/ directories instead of cherry-picked
subdirectories so the CLI reference stays complete as the platform
grows. Update CLAUDE.md schema paths, skip _generated/ in codegen,
platform-suffix build outputs, and drop redundant example copies
from fetchReference.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

…orts

Add turbo task dependency so @tale/cli#generate runs before typecheck,
ensuring the gitignored embedded-files.ts exists in CI. Remove unused
IntegrationOperation and SqlOperation type exports to fix Knip check.
@larryro larryro merged commit 7800877 into main Mar 29, 2026
15 of 16 checks passed
@larryro larryro deleted the feat/tale-init-start-update branch March 29, 2026 21:01
@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces a complete CLI framework for bootstrapping and managing Tale projects. It adds three new subcommands—init (project initialization), start (dev environment startup), and update (project file synchronization)—along with supporting infrastructure. The implementation embeds reference documentation and example code from the monorepo via a new code generation script, tracks file changes through SHA-256 checksums, and manages project metadata in tale.json. The backend adds an action to list installed integrations for agents, and the CLI gains utilities for locating projects, reading configs, computing file hashes, and orchestrating Docker Compose-based development environments. The version is bumped to 1.0.0-dev and the generate step is added to the build pipeline.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

The PR spans 16+ new files with heterogeneous responsibilities. Files such as init.ts (+190 lines), update.ts (+170 lines), deploy.ts (+72 lines), and ensure-env.ts (modified, +52/-48) contain dense file system and project management logic requiring careful examination. Checksum computation, embedded file materialization, project state transitions during init/update, Docker Compose configuration, and volume discovery routines all demand separate reasoning paths. Conversely, command definitions and simple utility modules are relatively straightforward. The interplay between embedded file generation, checksum tracking, and multi-step initialization adds complexity.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: adding three new CLI commands (init, start, update) and their embedded reference files support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tale-init-start-update

Comment @coderabbitai help to get the list of available commands and usage tips.

larryro added a commit that referenced this pull request Mar 29, 2026
The embedded-files module is gitignored and must be generated before
typecheck and build. This was missing after #912 added the dependency.
yannickmonney pushed a commit that referenced this pull request Apr 8, 2026
The embedded-files module is gitignored and must be generated before
typecheck and build. This was missing after #912 added the dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant