A fully featured API client and CLI for the Kanka API using Effect.ts.
- Interactive CLI: Terminal-based user interface for managing your Kanka campaigns
- Type-safe: Full TypeScript support with proper types for all API operations
- Error Handling: Comprehensive error handling using Effect.js
- Testability: Easy to test with Effect.js's testing utilities
- Configurability: Flexible configuration options
You can set up your environment variables in two ways:
-
Interactive Setup: Run the following command to interactively set up your environment variables:
just setup-env
This will guide you through setting up all required and optional environment variables.
-
Manual Setup: Create a
.env
file in the root of the repository based on the.env.example
file.
The Kanka CLI provides a convenient terminal interface for interacting with your Kanka campaigns.
- Node.js 18+ or Bun runtime
- A Kanka account with API access
- An API token from Kanka
Create a .env
file in the project root with the following variables:
KANKA_API_KEY=your_api_key_here
KANKA_BASE_URL=https://app.kanka.io/api/1.0
Alternatively, you can use the config
command to set these values:
bun kanka config
To run the CLI application:
bun kanka
This will launch the main menu where you can select from available commands.
Available commands:
bun kanka campaigns
- List and interact with campaignsbun kanka config
- Configure API settings
-
Campaign Management:
- List and select campaigns
- View campaign details and settings
- Access campaign URLs
-
Entity Management:
- Browse entities by type or view all entities
- Create new entities of unknown supported type
- Edit existing entities (name, description, image URL, privacy settings)
- Delete entities with confirmation
-
Member Management:
- View campaign members and their roles
The Kanka API client and CLI are organized as follows:
src/Kanka/api/
: API client implementationclient.ts
: Core HTTP clientcampaigns/
: Campaign-related API functionsentities/
: Entity-related API functions
src/Kanka/cli/
: CLI implementationindex.ts
: Main entry pointcomponents/
: UI components for different viewsservices/
: Business logic for CLI operations
The following environment variables are used:
KANKA_API_KEY
: Your Kanka API key (required)KANKA_BASE_URL
: The base URL for the Kanka API (defaults tohttps://app.kanka.io/api/1.0
)
See CONTRIBUTING.md for details on contributing to this project.