GitHub Commands¶
Fast Craftsmanship provides a comprehensive set of commands for managing GitHub repositories and workflows.
Overview¶
The github command group allows you to:
- Create and manage GitHub repositories
- Set up CI/CD workflows
- Configure GitHub environments and secrets
- Manage issues and pull requests
- Monitor workflow runs
Prerequisites¶
- A GitHub account
- GitHub CLI (
gh) installed and authenticated - Appropriate permissions for the repositories you want to manage
Basic Commands¶
List Repositories¶
Lists all repositories the authenticated user has access to.
Create Repository¶
Creates a new GitHub repository.
| Option | Description |
|---|---|
--private |
Creates a private repository (default: public) |
--description |
Optional description for the repository |
--team |
Team that should be granted access to the repository |
Delete Repository¶
Deletes a GitHub repository.
| Option | Description |
|---|---|
--confirm |
Skip confirmation prompt |
Workflow Commands¶
Setup Workflows¶
Sets up common CI/CD workflows for the repository, including:
- Continuous Integration workflow (testing, linting)
- Release workflow (build and publish)
- Version bumping workflow
List Workflow Runs¶
Lists recent workflow runs for a repository.
| Option | Description |
|---|---|
--limit |
Maximum number of runs to display (default: 10) |
--workflow |
Filter by workflow name or ID |
View Workflow Run¶
Shows detailed information about a specific workflow run.
Watch Workflow Run¶
Monitors a workflow run in real-time, showing status updates.
Environment Commands¶
Setup Environments¶
Creates staging and production environments for the repository.
Add Secrets¶
Adds repository-level secrets for use in GitHub Actions workflows.
Examples¶
Setting up a new project with CI/CD¶
# Create repository
fcship github create my-awesome-project --description "My awesome Python project"
# Set up workflows
fcship github setup setup-workflows my-awesome-project
# Set up environments
fcship github setup setup-environments my-awesome-project
# Add PyPI token for publishing
fcship github setup setup-secrets my-awesome-project PYPI_API_TOKEN your-token-value