new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Deno · Reference · all subjects

cli commands/init

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

deno init basic usage

The deno init command scaffolds a new Deno project. It creates main.ts and main_test.ts files. main.ts exports an add function that adds two numbers together, and main_test.ts contains a test for this function.

deno init with directory argument

You can specify a directory argument to deno init to initialize a project in a specific location. For example, deno init my_deno_project will create a project in the my_deno_project directory.

deno init --lib flag

Running deno init --lib bootstraps a JSR-ready library project. It prefills deno.json with name, version, and exports fields. The resulting deno.json includes entries like: name (e.g. 'my-lib'), version (e.g. '0.1.0'), exports (set to './mod.ts'), tasks with a dev task ('deno test --watch mod.ts'), and imports with @std/assert and other dependencies.

deno init --serve flag

Running deno init --serve bootstraps a web server project that works with deno serve. The resulting deno.json includes tasks with a dev task ('deno serve --watch -R main.ts') and imports for @std/assert and @std/http. The project can be started with deno task dev.

deno init --empty flag

Running deno init --empty bootstraps an empty project with a basic console log. The resulting deno.json contains only a tasks field with a dev task ('deno run --watch main.ts'). The project can be started with deno task dev.

deno init example output

When deno init is run successfully, it outputs a message '✅ Project initialized' followed by suggested commands to get started, including deno run main.ts, deno task dev, and deno test.

deno init --lib with directory example output

When deno init my_deno_project --lib is run, it creates a JSR-ready library project with deno.json containing: name 'my_deno_project', version '0.1.0', exports './mod.ts', tasks with dev task 'deno test --watch mod.ts', license 'MIT', and imports with @std/assert.

deno init --serve example output

When deno init --serve is run, it creates a deno.json with tasks containing dev task 'deno serve --watch -R main.ts' and imports for @std/assert and @std/http. Running deno task dev starts the server which outputs 'Watcher Process started.' followed by 'deno serve: Listening on http://0.0.0.0:8000/'.

deno init --empty example output

When deno init --empty is run, it creates a deno.json with tasks containing dev task 'deno run --watch main.ts'. Running deno task dev outputs 'Task dev deno run --watch main.ts', 'Watcher Process started.', and then 'Hello world!'.

Give your agent this brain