A command-line interface for interacting with the Twist API. Manage your workspaces, channels, and conversations from your terminal.
- Personal access token authentication via environment variable or flag
- List workspaces
- No token storage - follows best practices like OpenAI and Anthropic CLIs
go install github.com/intelligrit/twist-cli@latestgit clone https://github.com/intelligrit/twist-cli.git
cd twist-cli
go build- Go to https://twist.com/integrations (must be logged into Twist)
- Create a new integration or select an existing one
- Click into your integration/app
- Navigate to the OAuth section
- Find and copy the Test Token (this is your personal access token for testing)
Note: The test token has full scope access for the logged-in user and is perfect for CLI usage. For production OAuth applications, you would implement the full OAuth 2.0 flow instead.
You have three options to provide your token (in order of priority):
Option 1: Environment Variable (Recommended)
export TWIST_API_TOKEN="your-token-here"
twist workspaces listOption 2: Command Flag
twist workspaces list --token "your-token-here"Option 3: Interactive Prompt
twist workspaces list
# You'll be prompted to enter your token (not saved)For convenience, add the environment variable to your shell profile:
# ~/.bashrc or ~/.zshrc
export TWIST_API_TOKEN="your-token-here"View all workspaces you have access to:
twist workspaces listOutput:
ID NAME PLAN
-- ---- ----
12345 My Team unlimited
67890 Personal Space free
Get help on available commands:
twist --help
twist workspaces --helpCheck the CLI version:
twist --versiontwist-cli/
├── cmd/ # Cobra command definitions
├── pkg/
│ └── api/ # Twist API client
└── internal/
└── auth/ # Token authentication
- Go 1.21 or higher
go test ./...go build -o twistContributions are welcome! This project follows standard Go conventions to make it easy for developers to contribute.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following Go best practices
- Write tests for new functionality
- Ensure all tests pass (
go test ./...) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow standard Go formatting (
gofmt,go vet) - Write clear, descriptive commit messages
- Add comments for exported functions and types
- Keep functions focused and modular
This CLI uses the Twist API v3. For more information about available endpoints and data structures, see the official documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or contributions, please open an issue on GitHub.
Future enhancements may include:
- Channel management commands
- Conversation and message operations
- Thread management
- User and team management
- Webhooks configuration
- OAuth2 flow support
- Shell completion
