nocti new#
The new command creates a new resource (notebook, todo list, or calendar) within a Nocti project.
Usage#
nocti new [command] [flags]Description#
Resources are the primary way to organize information in Nocti. Each resource is created as a directory containing a hidden .nocti.json file with its metadata (ID, name, type, and parent information).
Hierarchical Resources#
If you run nocti new while inside another resource’s directory, the new resource will be created as a child of the current one. This relationship is tracked in:
- The main
.nocti/nocti.jsonfile (via aparentkey in the resource entry). - The parent resource’s local
.nocti.jsonfile (in aresourceslist). - The child resource’s local
.nocti.jsonfile (via aparentkey).
Subcommands#
notebook: Create a new notebook.todo: Create a new todo list.calendar: Create a new calendar.
Tip: For template-based file creation with dynamic placeholders and automated naming, use the interactive creation menu in nocti list. Learn more in the Templates documentation.
Flags (Global for new)#
-n, --name string: The name of the resource to create. If not provided, you will be prompted.-o, --overwrite: Overwrite the hidden.nocti.jsonfile if it already exists in the target directory.
Examples#
Create a notebook interactively:
nocti newCreate a todo list with a specific name:
nocti new todo --name "Shopping List"Create a nested resource:
cd my-notebook
nocti new todo --name "Notebook Tasks"