This CLI allows you to control Scrapbox directly from your terminal.
-
Clone the Repository
git clone https://github.com/katayama8000/scrapbox-manager cd scrapbox-manager -
Install Deno
If you don't have Deno installed, you can install it from here: https://deno.land/manual/getting_started/installation
-
Configure Environment
- Copy
.env.distto.envand set required environment variables:cp .env.dist .env
COSENSE_PAT(required for writing to Cosense)- Issue this token from your own Cosense account settings.
- This CLI only reads the token from environment variables. It never fetches or provisions tokens automatically.
GEMINI_API_KEY(required for AI-generated weekly/english question features)
- Copy
-
Run Commands
- Deno automatically downloads dependencies on the first run.
- For daily updates:
deno task daily
- For weekly updates:
deno task weekly
-
Run on GitHub Actions
- set secrets in your repository settings:
COSENSE_PATDISCORD_WEBHOOKBACKLOG_API_KEY
- set secrets in your repository settings:
COSENSE_PATmust be created and managed by repository maintainers.- Enable GitHub Actions in your repository.
This project's design is a hybrid of Clean Architecture and Hexagonal Architecture (Ports and Adapters).
- It uses the layered structure of Clean Architecture (
domain,application,infrastructure) to separate concerns. - It implements the "Ports and Adapters" pattern from Hexagonal Architecture,
using interfaces (
ports) to decouple the application core from external tools like APIs.
The key principle is the Dependency Rule: dependencies only flow inwards,
from infrastructure to application to domain. This makes the core business
logic independent of external details, improving testability and
maintainability.
For a more detailed breakdown and diagrams, see ARCHITECTURE.md.