Skip to content

hype preview depends on tree #114

Description

@dolanor

Description

hype preview doesn't work without the tree cli tool.

Steps to Reproduce

  1. Install ubuntu 24.04 and Go
  2. git clone https://github.com/gopherguides/hype/
  3. cd hype
  4. go install ./cmd/hype
  5. hype preview -theme github -f hype.md

Expected Behavior

I should be able to use the preview

Actual Behavior

$ hype preview -theme github -f hype.md 
hype version dev (commit: none, built: unknown)
$ hype
------
*github.com/gopherguides/hype/cmd/hype/cli.App

Available Commands:
  Command   Description
  -------   -----------
  blog      static blog generator commands (init, build, new)
  export    export the document to a different format (markdown,json,html,etc...)
  marked    outputs for the Marked app (https://marked2app.com/)
  preview   live preview server with file watching and auto-reload
  slides    outputs slide format for presentation
  validate  validate document integrity without full export
  version   print version information

Error: initial build failed: execute error: filepath: /home/dolanor/src/hype/hype.md
document: Hype
execute error: filepath: /home/dolanor/src/hype/hype.md
cmd: $ tree ./docs
exit: -1
cmd error: exec: "tree": executable file not found in $PATH

Environment

  • OS: Ubuntu 24.04
  • Hype version: hype version dev (commit: none, built: unknown) (actual: v0.8.0 from source)
  • Go version: go version go1.25.0 linux/amd64

Hype Document (if applicable)

the hype.md file from the root directory

Error Output

Error: initial build failed: execute error: filepath: /home/dolanor/src/hype/hype.md
document: Hype
execute error: filepath: /home/dolanor/src/hype/hype.md
cmd: $ tree ./docs
exit: -1
cmd error: exec: "tree": executable file not found in $PATH

Activity

  1. added a commit that references this issue on Sep 30, 2026
    97a4c40
  2. corylanou commented on Sep 30, 2026

    @corylanou
    Member

    Thanks for the report. We're keeping tree in the docs on purpose. The Arbitrary Commands section is there to show that hype can run real tools and embed their output, and tree is a well-known tool that developers use all the time for exactly this kind of documentation.

    The docs should have said that any command run with cmd has to be installed on the machine building them. #116 adds that. The quickstart now starts with a simple echo example that runs anywhere, then shows the tree example with a note that tree needs to be installed. tree is also listed as a prerequisite for building the hype docs.

    This will close when #116 merges.

  3. added a commit that references this issue on Sep 30, 2026
    9cdb58e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions