5 exercises — practise commands and instructions in CLI docs, README files, setup guides, and deployment documentation: "Run the server", "Set the environment variable", "Ensure the dependency is installed".
0 / 5 completed
1 / 5
A developer is writing a CLI quick-start guide. Which sentence uses the imperative mood correctly to instruct the user?
"Run the server with npm start." is the canonical imperative form. In CLI documentation, README quick-starts, and setup guides, the bare imperative (base verb, no subject) is the standard: "Run", "Install", "Set", "Ensure", "Navigate", "Open". It is direct, unambiguous, and space-efficient. Option A ("You should run…") uses a modal — appropriate for softer suggestions but not for procedural steps. Option C uses passive voice, which obscures the agent (who runs the server?). Option D is a gerund phrase — not a complete instruction. The imperative is the default choice for any numbered or bulleted setup step in technical documentation.
2 / 5
A README setup section reads: "_____ the DATABASE_URL environment variable to point to your PostgreSQL instance before starting the application." Which imperative verb best completes this instruction?
Set is the correct imperative. For environment variable instructions in README files and configuration guides, the imperative is the standard form: "Set DATABASE_URL=postgres://…", "Export the API key", "Assign the secret to the environment". The verb set is particularly common in shell and config contexts: "Set the NODE_ENV variable to production", "Set the timeout to 30 seconds in config.yml". Option A (Setting) is a gerund — incomplete as a main clause instruction. Option B (You set) is a declarative statement, not an imperative. Option D (Sets) is third-person present — it describes, not instructs.
3 / 5
A developer writes a troubleshooting step: "Before opening a bug report, _____ that the dependency is installed and the correct version is listed in package.json." Which option is correct?
Ensure is the correct imperative. Ensure is one of the most common verbs in technical documentation for pre-requisite checks: "Ensure the dependency is installed", "Ensure the port is not already in use", "Ensure you are running Node.js 18 or higher". The imperative clause here follows a temporal adverbial ("Before opening a bug report"), which is a standard pattern in troubleshooting guides and contributing guidelines: "Before submitting a PR, ensure all tests pass." Compare synonyms also used in this register: verify, confirm, check. Option A (gerund) is incomplete. Option C (declarative) is informal. Option D (past participle) does not function as an imperative.
4 / 5
A developer writes a multi-step install section. Which is the most natural and grammatically correct sequence of imperatives for a README?
"Clone the repository, install the dependencies, and start the server." is the canonical form for a numbered or inline sequence of imperative instructions. All three verbs are bare imperatives in parallel structure, joined by commas and a final and — this is the standard for README setup sections and quickstart guides. Examples: "Fork the repo, create a branch, make your changes, and open a pull request." Option A mixes second-person declaratives and a modal — inconsistent and informal. Option C uses gerunds — a list of phrases, not complete instructions. Option D converts all three to passive modal constructions — grammatically valid but too heavy and impersonal for a practical guide.
5 / 5
A technical writer reviews this warning in a deployment guide: "You must not push directly to the main branch." Which rewrite uses the negative imperative most concisely and directly?
"Do not push directly to the main branch." is the standard negative imperative: Do not + base verb. This is the direct and unambiguous form for prohibitions in technical documentation, contributing guidelines, and deployment guides. Examples: "Do not commit directly to main", "Do not expose your API key in client-side code", "Do not run this command as root". The contraction Don't is also acceptable in less formal docs. Option A ("Avoid pushing") is a softer, gerund-based instruction — acceptable but less direct for a prohibition. Option C is passive and descriptive, not instructional. Option D is grammatically incorrect ("Never push … is the rule" creates a sentence fragment structure).