Warning
This repository is deprecated and no longer maintained.
The San Francisco Compute sf CLI has been rewritten in Rust. If you have
this legacy CLI installed, run sf migrate to switch.
The documentation below is retained for archival reference only.
This is the San Francisco Compute command line tool.
Install the command line tool by running:
curl -fsSL https://sfcompute.com/cli/install | bash
Then, you can run the cli:
Local Development / Contributing
- Install Node.js (v22 or later) - used as the runtime
- Install Bun - used as the package manager
- Install dependencies: bun install
- Auth your CLI with bun run prod login
- Make code changes
- Test changes with
- bun run dev to test against local API
- bun run prod to test against production API
- These are aliases to the user facing sf command. So if you wanted to run
sf login locally against the local API, run bun run dev login
Releases are managed through GitHub Actions. To create a new release:
- Ensure your changes are merged into the main branch
- Go to the
Actions tab
in the repository
- Click on the "Release" workflow
- Click "Run workflow"
- Select the version bump type:
- patch: for backwards-compatible changes (0.0.x)
- minor: for breaking changes (0.x.0)
- major: for major breaking changes (x.0.0)
- prerelease: for pre-release versions (0.0.0-pre.timestamp)
- Click "Run workflow" to start the release process
Version Types and Behavior
Regular Releases (patch/minor/major)
- Creates a new GitHub release with compiled binaries
- Updates package.json with the new version
- Users on older versions will be notified to update
- Patch updates trigger automatic updates for users
- Tagged as pre-release in GitHub
- Include timestamp in version (e.g., 0.6.4-pre.1709347826543)
- Important: Users on stable versions:
- Will not see update notifications for pre-releases
- Cannot upgrade to pre-releases
- Will only see and receive stable version updates
- Pre-release users:
- Can update to newer pre-releases
- Can update to stable releases
- Will see update notifications normally
The workflow will:
- Run quality checks:
- Linting with biome ci
- Type checking with tsc --noEmit
- Run all tests with vitest
- Bump the version in package.json
- Create a new GitHub release with compiled binaries
- Push the version bump commit back to main
Note: The release workflow will only run on the main branch and will fail if
any of the quality checks fail.