diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -229,6 +229,9 @@ func app() (string, error) {
 	if err != nil {
 		return "", err
 	}
+	if ra == nil {
+		return "", errors.New("no app found, run from a repo with a flynn remote or specify one with -a")
+	}
 	serverConf = ra.Server
 	flagApp = ra.Name
 	return ra.Name, nil
cli: Error when there's no git repo