Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@m14i/sith) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Sith
Turn your context to the dark side.
Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.
Usage
No installation required! Run with npx:
npx @m14i/sithInteractive Menu (Default)
npx @m14i/sithThis will present you with options to:
- 🔨 Build Docker image
Quick Build
Build the Docker image directly:
npx @m14i/sith docker --build
# or
npx @m14i/sith --buildInteractive Shell
Run an interactive shell in the Docker container:
npx @m14i/sith shellThis will:
- Mount current directory to
/workspace - Load full Nix environment with all tools
- Make OpenCode CLI available
- Pass your
GITHUB_TOKENenvironment variable
Authentication
To use GitHub Copilot models, set the GITHUB_TOKEN environment variable:
Quick start (using GitHub CLI):
export GITHUB_TOKEN=$(gh auth token)
npx @m14i/sith shellOr inline:
GITHUB_TOKEN=$(gh auth token) npx @m14i/sith shellManual token:
- Create a token at https://github.com/settings/tokens
- Required scopes:
copilot,repo,read:org - Export it:
export GITHUB_TOKEN=gho_your_token_here
npx @m14i/sith shellMake it persistent (add to ~/.zshrc or ~/.bashrc):
export GITHUB_TOKEN=$(gh auth token)Commands
npx @m14i/sith (default)
Launches the interactive menu.
npx @m14i/sith docker --build
Build the Docker image.
npx @m14i/sith shell
Run interactive shell in the Docker container.
Features
- Interactive Menu: Navigate with arrow keys, select with Enter
- Direct Commands: Build or shell access without menu
- Dockerized Environment: Consistent setup across machines
- Nix Integration: Full development environment with all tools
- CI-Ready: Standardize builds across local and CI pipelines
Development
For contributors working on the CLI:
# Install dependencies
pnpm install
# Run in development mode (no build)
pnpm dev
# Build and test
pnpm dev:build # Build and run CLI
pnpm dev:shell # Build and launch shell
# Type checking
pnpm typecheck
# Clean build artifacts
pnpm cleanPublishing
Automated releases using semantic-release and conventional commits.
For Maintainers
Commit Format:
feat:- New feature (triggers minor version bump)fix:- Bug fix (triggers patch version bump)BREAKING CHANGE:- Breaking change (triggers major version bump)chore:,docs:,style:- No release
Release Process:
- Commit changes following conventional commit format
- Push to
mainbranch - GitHub Action automatically:
- Analyzes commits and determines version bump
- Generates CHANGELOG.md
- Creates GitHub release
- Publishes to npm
Example:
git commit -m "feat: add new interactive menu option"
git push origin main
# Automatic release triggered!Requirements:
NPM_TOKENsecret configured in GitHub repository settings- Commits must follow conventional commit format