How do I tag my package so it can be easily found in remote repositories?

← Getting Started · Ref: Q8

EK9 packages include a `tags` field inside `defines package` that accepts a List of String values. These tags serve as searchable metadata in remote repositories, helping other developers discover your package.

Declare tags as a List literal:

  tags <- [
    "networking",
    "http",
    "rest-client"
  ]

Tag best practices:
- Use lowercase with hyphens for multi-word tags
- Include the problem domain ("networking", "database", "parsing")
- Include the technology area ("http", "json", "csv")
- Include the package role ("client", "server", "utility", "middleware")
- Keep tags specific: "http-client" is more useful than "tools"
- Limit to 5-10 tags: too many dilutes discoverability

Combined with `description` and `publicAccess`, tags form the discovery profile:

  description as String = "Lightweight HTTP client with retry and timeout support"
  publicAccess <- true
  tags <- [ "http", "client", "networking", "rest" ]

Setting `publicAccess <- false` makes the package private: it can still be deployed to a private repository but will not appear in public searches.

The code example below shows a well-tagged package ready for repository discovery.

See Q7 for managing dependencies. See Q9 for licensing. See Q13 for packages vs modules.

Example

defines module qa.getting.started.tag.packages

  defines package

    version as Version: 1.0.0-0
    description as String = "Lightweight HTTP client with retry and timeout support"
    license <- "MIT"
    publicAccess <- true

    tags <- [
      "http",
      "client",
      "networking",
      "rest",
      "retry"
    ]

    applyStandardIncludes <- true

  defines program
    TagPackages()
      stdout <- Stdout()

      stdout.println("Package tagged for repository discovery")
      stdout.println("Tags help other developers find your library")

Common mistakes

E01040 — Defining two constructs with the same name in the same module triggers E01040 — duplicate construct. Each program, class, or function name must be unique within its module. See ek9 -h E01040 for details.

Incorrect:

defines program
    TagPackages()
      stdout <- Stdout()
    TagPackages()
      stdout <- Stdout()

Correct:

defines program
    TagPackages()
      stdout <- Stdout()
Other ways to ask this
  • How do I make my EK9 package discoverable?
  • What are tags in defines package?
  • How do I categorize my EK9 library?
  • How do package tags work?
  • What is the EK9 equivalent of Cargo.toml keywords or PyPI classifiers?

Coming from another language?

Python: PyPI classifiers and keywords in pyproject.toml. Java: Maven pom.xml has no standard tags (relies on artifact naming). Rust: Cargo.toml keywords array (max 5). npm: package.json keywords array. Go: no package-level tags (relies on pkg.go.dev indexing). EK9 tags are a simple List literal in the source file.

Keywords: beginner, npm, pypi, cargo, library, first, metadata, categorize, discoverable, keywords, start, package, tags, intro, search, repository, publicAccess