Skip to content

Add template library and jot new command#24

Open
Intina47 wants to merge 1 commit intomainfrom
mamba/add-template-library-for-developers
Open

Add template library and jot new command#24
Intina47 wants to merge 1 commit intomainfrom
mamba/add-template-library-for-developers

Conversation

@Intina47
Copy link
Copy Markdown
Owner

Motivation

  • Provide developer-focused starter templates (meeting, incident, RFC) to speed adoption and capture structured notes.
  • Expose a simple CLI flow to seed notes from those templates so users can run jot new --template <name> out of the box.
  • Document how to contribute additional templates in the repository README.

Description

  • Embed template files under templates/ using //go:embed templates/*.md and expose them via an embed.FS.
  • Add a new CLI subcommand new and argument parsing functions jotNew and parseTemplateArg to accept --template/-t and emit the requested template via writeTemplate.
  • Add three starter templates: templates/incident.md, templates/meeting.md, and templates/rfc.md.
  • Update README.md with usage (jot new --template incident) and contribution instructions, and add unit tests for the new behavior (TestJotNewWritesTemplate and TestJotNewRejectsUnknownTemplate).

Testing

  • Ran go test ./... and all tests passed successfully.
  • New unit tests exercise jotNew output for a known template and error handling for unknown templates and passed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant