# Crystal init is confusing

**URL:** <https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554>\
**Category:** Crystal Contrib\
**Created:** [April 5, 2022, 7:12pm UTC](https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554 "2022-04-05T19:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/rogerdpack/32/117_2.png) [@rogerdpack](https://forum.crystal-lang.org/u/rogerdpack)\
**Post date:** [April 5, 2022, 7:12pm UTC](https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554/1 "2022-04-05T19:12:55Z")

</div>

As a note, after running crystal init, it creates a “main” file, ex:

```auto
# TODO: Write documentation for `TempDb`
module TempDb
  VERSION = "0.1.0"

  # TODO: Put your code here
end

```

This is actually fairly confusing. Am I supposed to add code there, like `3+3`? How do I then run it? It would be nice to make this more clear somehow…

One way: put “Put your code here” below the module. Another way: have it create an initial method that gets called below the module. I’m sure there are other ways. I just am kind of missing the simplicity of “here’s a file, you just run it” which feels gone…peace!

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [April 5, 2022, 7:25pm UTC](https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554/2 "2022-04-05T19:25:48Z")

</div>

I would simply remove those TODOs

---

<div class="post-metadata">

**Author:** ![postmodern](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/postmodern/32/902_2.png) [@postmodern](https://forum.crystal-lang.org/u/postmodern)\
**Post date:** [April 19, 2022, 12:49am UTC](https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554/3 "2022-04-19T00:49:03Z")

</div>

Semi-related note, I still get confused by `crystal init lib` vs `crystal init app`. I wish there was one `crystal init` command with an option for adding a CLI target (aka an app).

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [April 19, 2022, 12:54am UTC](https://forum.crystal-lang.org/t/crystal-init-is-confusing/4554/4 "2022-04-19T00:54:13Z")

</div>

The only difference is `shard.lock` is in `.gitignore` in a `lib` but not an `app`. Doesn’t have anything to do with CLI targets.
