How do I get help on a specific EK9 type or keyword?

← Getting Started · Ref: Q21

EK9 has a comprehensive built-in help system accessible from the command line.

Core commands:

  ek9 -h <keyword>    Show help for a specific topic
  ek9 -H              List ALL available help keywords
  ek9 -h quickstart   Show a getting-started guide with Hello World

What you can look up:

1. Built-in types: ek9 -h String, ek9 -h List, ek9 -h Dict, ek9 -h Optional

   Shows constructors, methods, operators, and usage examples.

2. Language constructs: ek9 -h class, ek9 -h function, ek9 -h trait

   Explains the construct with syntax guidance.

3. Operators: ek9 -h :=, ek9 -h ?, ek9 -h $

   Describes what each operator does and when to use it.

4. Error codes: ek9 -h E05030

   Explains what the error means and how to fix it.

5. Concepts: ek9 -h lambda, ek9 -h generic, ek9 -h stream

   Bridges concepts from other languages to EK9 equivalents.

Fuzzy matching:

   The help system tolerates typos. If you type ek9 -h Strng, it resolves to String and shows the correct help.

Q&A system:

  ek9 -q <words>      Search for answers using natural language
  ek9 -q              List all Q&A entries by category

Error detail levels:

  -E0 (default) compact errors, -E1 visual with snippets, -E2 with suggestions, -E3 full explanations.

See Q23 for the full catalog of built-in types you can look up. See Q2 for all CLI command options.

Example

defines module qa.getting.started.help.system

  defines program
    HelpDemo()
      stdout <- Stdout()
      stdout.println("Use 'ek9 -h String' to see String's full API")
      stdout.println("Use 'ek9 -H' to list all help topics")
      stdout.println("Use 'ek9 -q' to search the Q&A knowledge base")

Common mistakes

E50060 — EK9 Stdout uses println() for output with newline. Methods like writeln() or write() do not exist. Triggers E50060 — method not resolved. See ek9 -h Stdout for the full API.

Incorrect:

stdout.writeln("Use 'ek9 -h String' to see String's full API")

Correct:

stdout.println("Use 'ek9 -h String' to see String's full API")
Other ways to ask this
  • How do I look up EK9 type information from the command line?
  • What does ek9 -h do?
  • How do I list all help topics in EK9?
  • Can EK9 explain error codes?

Coming from another language?

Java: no built-in CLI help for types, Rust: rustup doc or doc.rust-lang.org, Go: go doc package, Python: help() in REPL. EK9: ek9 -h for types, keywords, operators, error codes, and concepts all from one command. Unique features: fuzzy matching tolerates typos, and -q provides natural language Q&A search.

Keywords: system, code, intro, reference, keyword, search, error, start, help, api, type, documentation, lookup, javadoc, beginner, first